home *** CD-ROM | disk | FTP | other *** search
- head 1.1;
- access;
- symbols;
- locks
- dglattin:1.1; strict;
- comment @# @;
-
-
- 1.1
- date 92.08.18.04.58.04; author dglattin; state Exp;
- branches;
- next ;
-
-
- desc
- @test code.
- @
-
-
- 1.1
- log
- @Initial revision
- @
- text
- @#include <assert.h>
- #include <limits.h>
- #include <stdlib.h>
- #include <strings.h>
- #include <SubClass3.h>
-
-
- @@implementation SubClass3
-
- #define THE_MESSAGE "This is a test message from"
-
-
- + initialize {
-
- printf( "If you see this message then SubClass3 received a"
- " +initialize method\n" );
-
- return self;
- }
-
-
- + new {
-
- self = [ super new ];
- sprintf (smart, THE_MESSAGE);
-
- return self;
- }
-
-
- - print:( const char* )aPhrase {
-
- char aMsg[ 2048 ];
-
-
- sprintf( aMsg, "This message comes to you from SubClass3 forwarded"
- " to it's super class, msg=%s\n", aPhrase );
-
- return [ super print:aMsg ] ;
- }
-
-
- - ( int )additionalMethod {
-
-
- return INT_MAX;
- }
-
-
- - storeOn:( int )aFd {
-
- int len;
-
-
- [ super storeOn:aFd ];
- len = write (aFd, smart, sizeof (smart));
- assert(len == sizeof (smart));
-
- return self;
- }
-
-
- - readFrom:( int )aFd {
-
- int len;
-
-
- [ super readFrom:aFd ];
- len = read (aFd, smart, sizeof (smart));
- assert(len == sizeof (smart));
- assert(!strcmp (smart, THE_MESSAGE));
-
- return self;
- }
-
-
-
- @@end@
-